<?php

class AdminloginController extends Controller{
    public $layout='//layouts/blank';
    
    public function actionForm(){
        $this->render('login');
    }
    
    public function actionLogin(){
//        if(!Yii::app()->session['admin'])
//            $this->redirect('index.php?r=AdminLogin/Form');
        Yii::app()->session['admin'] = true;
        $this->redirect('index.php?r=StaffManage/view');
    }
    
    public function actionLogout(){
        unset(Yii::app()->session['admin']);
        $this->redirect('index.php');
    }
}

?>
